<template>
	<view>
		<view v-for="(item,index) in datalist" style="margin: 10rpx;">
		<CustomTextView
		:nID="item.nID"
		:title="item.title"
		:isTop="item.isTop"
		:author="item.author"
		:comments="item.comments"
		:time="item.time"
		  
		@click="onCustomViewClick(index)">
		<template v-slot:tips>
			<view class="slotcontent" v-if="item.showSearch">
				<text>搜索：</text>
				<view class="borderbox"><text>今日金价</text></view>
				<view class="borderbox"><text>精选好物</text></view>
			</view>
		</template>
		</CustomTextView>
		</view>
	</view>
</template>

<script>
	import  CustomTextView from"../../components/cardViewText.vue"
	export default {
		components:{
			CustomTextView
		},
		data() {
			return {
				datalist:[
					{
				nID:"T15627",
				title:"14个月从100加开到1000家门店，蜜雪冰城为何买下这家精良啤酒",
				isTop:true,
				author:"界面新闻",
				comments:56,
				time:"2025.10.07",
				Image:['/static/xidada.png']
				},{
				nID:"B16684",
				title:"把握历史大势共创美好未来",
				isTop:false,
				author:"人们日报",
				comments:1025,
				time:"2025.10.25"	
				},{
				nID:"B16684",
				title:"黄金还能走多远？卖方高呼“第三浪启动,230多份研报看多",
				isTop:false,
				author:"今日金价",
				comments:1025,
				time:"2025.10.11"	,
				Image:['/static/hangjin.png']
				},{
				nID:"B16633",
				title:"“没有短板”的完美战鹰！歼-16机库独家探访",
				isTop:false,
				author:"红星新闻",
				comments:10,
				time:"2025.10.24"	
				}
				]
			}
		},
		props:{
			title:{
				type:String,
				default:"新闻标题",
				reauire:true
			},
			isTop:{
				type:Boolean,
				default:false,
				require:true
			},
			author:{
				type:String,
				default:"来源",
				require:true
			},
			comments:{
				type:Number,
				default:0,
				require:true
			},
			time:{
				type:String,
				default:"2025.1.1"
			}
		},
		methods: {
			
		}
	}
</script>

<style>

</style>
